package com.example.decorator.navigationbar.nav;

import java.util.Comparator;
import java.util.List;

/**
 * 题库具体装饰者
 */
public class QuestionNav extends AbstractDecorator {

    public QuestionNav(INav iNav) {
        super(iNav);
    }

    @Override
    public List<Menu> getNavs() {
        List<Menu> navs = iNav.getNavs();
        navs.add(new Menu(4, "题库"));
        navs.sort(Comparator.comparing(Menu::getId));
        return navs;
    }

}
